//
//  DetailCommentCell.m
//  LOL_JewelBox
//
//  Created by dllo on 15/4/28.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "DetailCommentCell.h"

@implementation DetailCommentCell

- (void)dealloc
{
    [_picImageView release];
    [_titleLabel release];
    [_descLabel release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.picImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.picImageView];
        self.picImageView.contentMode = UIViewContentModeScaleAspectFill;
        self.picImageView.autoresizesSubviews = YES;
        self.picImageView.clipsToBounds = YES;
        self.picImageView.layer.cornerRadius = 5;
        [_picImageView release];
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:16];
        self.titleLabel.numberOfLines = 0;
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.descLabel = [[UILabel alloc]init];
        self.descLabel.font = [UIFont systemFontOfSize:12];
        self.descLabel.numberOfLines = 0;
        [self.contentView addSubview:self.descLabel];
        [_descLabel release];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.picImageView.frame = CGRectMake(CONTENTWIDTH *0.02667, CONTENTHEIGHT *0.09524, CONTENTWIDTH *0.32, CONTENTHEIGHT *0.80952);
    self.titleLabel.frame = CGRectMake(CONTENTWIDTH *0.37333, CONTENTHEIGHT *0.09524, CONTENTWIDTH *0.53333, CONTENTHEIGHT *0.47619);
    self.descLabel.frame = CGRectMake(CONTENTWIDTH *0.37333, CONTENTHEIGHT *0.61904, CONTENTWIDTH *0.53333, CONTENTHEIGHT *0.28571);
}


@end
